//
//  Person.m
//  day1-内存管理MRC
//
//  Created by Maggie on 15/8/1.
//  Copyright (c) 2015年 fmning. All rights reserved.
//

#import "Person.h"

@implementation Person

-(Person *)initWithName:(NSString *)name andCar:(Car *)car{
    self = [super init];
    if (self) {
        self.name = name;
        self.car = car;
    }
    return self;
}

- (void)drive{
    NSLog(@"%@正在开%@车！",self.name,self.car.type);
}

- (void)dealloc{
    
    NSLog(@"person dealloc!");
    
    //ARC模式下不能显示调用dealloc方法
//    [super dealloc];
}

@end



